const excuteTask  = (index:number,intervalTime:number,taskCollection:Array<Function>) => {
  if(index == taskCollection.length) return;
  taskCollection[index]()
  setTimeout(() =>{excuteTask(index+1,intervalTime,taskCollection)},intervalTime)
}


export default (intervalTime:number,taskCollection:Array<Function>):void => {
  if(taskCollection.length  < 1) return;
  let index = 0;
  excuteTask(0,intervalTime,taskCollection);
}
